package com.twodudesdev.amerikick.learnkarate;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.ImageView;

public class HomeActivity extends Activity {
	
    @Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);
        
        /** Logo Image */
        ImageView logoView = (ImageView)findViewById(R.id.logoView);
        logoView.setImageResource(R.drawable.backgroundpick);
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	MenuInflater inflater = getMenuInflater();
	    inflater.inflate(R.menu.menu, menu);
	    return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	Intent i;
		// Handle item selection
	    switch (item.getItemId()) {
	    case R.id.contact_us:
	    	i = (new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.amerikick.com/index.php?option=com_aicontactsafe&view=message&layout=message&pf=1&Itemid=55")));
	    	startActivity(i);
	        return true;
	    default:
	        return super.onOptionsItemSelected(item);
	    }
    }
}
